package com.ybkj.o2o.zhuanche.service;

import com.ybkj.o2o.zhuanche.common.query.Car2Query;
import com.ybkj.o2o.zhuanche.common.query.CarQuery;
import com.ybkj.o2o.zhuanche.entity.Car;
import com.ybkj.o2o.zhuanche.entity.CarCriteria;

import java.util.List;

public interface CarService extends BaseService<Car, CarCriteria, Long> {

  List<Car> findAll(String appKey);

  Car findByCarId(Long carId, String appKey);

  int deleteById(Long id, String appKey);

  int deleteByCarTypeId(Long id, String appKey);
  
  Car findByNumber(String carNumber, String appKey);

  List<Car> findAllByInsuranceTime(Long companyId, String appKey);

  List<Car> findAllByOverhaulTime(Long companyId, String appKey);

  Car findByEmployId(Long employId, String appKey);

  Car queryCarByNumber(String carNumber, String appKey);

  List<Car> findByParams(CarQuery carQuery);

  Long countByParams(CarQuery carQuery);

  List<Car> findByTiaojians(Car2Query car2Query);

  Long countByTiaojians(Car2Query car2Query);
  
  Long updateCarTypeId(Long carTypeId,String appKey);

  Long findByRentalCompanyId(Long rentalCompanyId, String appKey);

  int batchCreate(List<Car> carss);

  List<Car> findByIds(CarQuery carQuery);

  Long countByIds(CarQuery carQuery);

  List<Car> updateByIds(Long[] ids, String appKey);


  long count(String appKey);

Car queryCarByNumberAndFlights(String carNumber, String flights, String appKey);

/**
 * 修改车辆上传状态
 * @param id
 */
void updateUpStatus(Long id);
}
